package jasonllinux.app.life;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Activity01 extends Activity {
    /** Called when the activity is first created. */
	
	private Button myButton;
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	System.out.println("Acitvity01------------->onCreate");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        myButton = (Button) findViewById(R.id.myButton);
        myButton.setOnClickListener(new MyButtonListener());
        
    }
    
    class MyButtonListener implements OnClickListener {

		@Override
		public void onClick(View v) {
			Intent intent = new Intent();
			intent.setClass(Activity01.this, Activity02.class);
			Activity01.this.startActivity(intent);
			
		}
    	
    }
    
    
    
    @Override
	protected void onDestroy() {
    	System.out.println("Acitvity01------------->onDestroy");
		super.onDestroy();
	}

	@Override
	protected void onPause() {
		System.out.println("Acitvity01------------->onPause");
		super.onPause();
	}

	@Override
	protected void onRestart() {
		System.out.println("Acitvity01------------->onRestart");
		super.onRestart();
	}

	@Override
	protected void onResume() {
		System.out.println("Acitvity01------------->onResume");
		super.onResume();
	}

	@Override
	protected void onStart() {
		System.out.println("Acitvity01------------->onStart");
		super.onStart();
	}

	@Override
	protected void onStop() {
		System.out.println("Acitvity01------------->onStop");
		super.onStop();
	}
	
}